<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class WeiboController extends Controller {

    public function add() {
        if ($this->isPost()) {
            $weibo = new Weibo($this->post('username'),$this->post('password'));
            if (!empty($_GET['act'])) {
                $act = $_GET['act'];
                $weibo->$act();
            } else {
                $weibo->pre_login();
            }
        } else {
            $this->display('weibo/add');
        }
    }

}
